home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2004 June
/
PCWorld_2004-06_cd.bin
/
software
/
vyzkuste
/
koolmoves
/
kmsetup.exe
/
{app}
/
Motion Scripts
/
Zoom Out
/
effect.txt
Wrap
Text File
|
2002-11-10
|
1KB
|
71 lines
mcN = "letter";
alphaSpeed = Math.floor((100 - alpha) / ((scale-100)/speed));
aLetters = new Array();
for (i = 0; i< numChar; i++){
aLetters[i+0] = i;
var letter = this[mcN +i];
letter._visible = true;
letter.init = letterInit;
letter.doEffect = effect;
letter.number = i;
}
function letterInit()
{
if (this.timerStarted == 1)
{
}
else
{
this.timerStarted = 0;
}
this._visible = true;
this.speed = this._parent.speed;
this.alphaSpeed = this._parent.alphaSpeed;
}
function effect()
{
if (this.timerStarted == 0)
{
this.start = getTimer();
this.timerStarted = 1;
this.gotoAndPlay(3);
}
else
{
if (getTimer() > (this.start + this._parent.startDelay)){
this._xscale += this.speed;
this._yscale += this.speed;
this._alpha -= this.alphaSpeed;
if (this._xscale >= this._parent.scale)
{
this.gotoAndStop("end");
this._alpha = 100;
this._xscale = 100;
this._yscale = 100;
this._visible = false;
this.timerStarted = 0;
}
}else{
this.gotoAndPlay(3);
}
}
}
function shuffle(){
return Math.floor(Math.random() * 3) -1;
}
if (random == 1){
aLetters.sort(shuffle);
}
if (reverse == 1){
aLetters.reverse();
}